﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Promedio
{
    class Program
    {
        static void Main(string[] args)
        {
            uint val = uint.MaxValue;
            
            Console.WriteLine(val);
            Console.WriteLine("-----------------");
            Console.WriteLine(promedioFloor(uint.MaxValue, uint.MaxValue));
            Console.ReadLine();
        }

        static uint promedioFloor (uint x, uint y)
        {
            return (x & y) + ((x ^ y) >> 1);
        }

        static void swap (ref uint x, ref uint y)
        {
            x ^= y;  // x = x ^ y;
            y ^= x;  // x = y ^ x;
            x ^= y;  // x = x ^ y;
        }
    }
}
